package com.liz.springCloudAlibaba.provider;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class DemoController {
    @Value("${server.port}")
    String port;
    @Value("${spring.application.name}")
    String applicationName;


    @GetMapping("getInfo")
    public String getInfo() {
//        System.out.println("testKey="+testKey);
        return "from " + applicationName + ", port= " + port;
    }

    @GetMapping("liveness")
    public String liveness() {
        return "{\"data\":\"alive\"}";
    }

}
